package app.kotlin_1.view

import android.content.Context
import android.support.v4.view.ViewPager
import android.util.AttributeSet
import android.view.MotionEvent
import java.util.jar.Attributes

/**
 * Created by 刘智强 on 2017/9/19.
 */
 class  MyViewPager :ViewPager{

     var  isCanScroll:Boolean=true
    constructor(context:Context):super(context){

    }
    constructor( context:Context,attrs:AttributeSet):super(context,attrs){

    }
    override fun onInterceptTouchEvent(ev: MotionEvent?): Boolean {
        return isCanScroll&&super.onInterceptTouchEvent(ev)
    }

    override fun onTouchEvent(ev: MotionEvent?): Boolean {
        return isCanScroll&& super.onTouchEvent(ev)
    }


}